Ext.define('Jason.view.main.ViewportModel', {
    extend: 'Ext.app.ViewModel',
    alias: 'viewmodel.mainviewport',
    formulas : {
    	userName :function(){
    		try{
    			return cfg.sub.accountInfo.realname;
    		}catch(e){
    			return '暂无人员登录';
    		}
    	}
    },
    data: {
        currentView: null
    },
	stores : {
		articleListStore : {
			xtype : 'store',
            fields: [
                {name: 'id'},
                {name: 'title'},
                {name: 'summary'},
                {name: 'date',mapping:'sendTime',type: 'date'},
                {name: 'userId'},
                {name: 'type'}
            ],
			data: [{"id":1,"title" : "通知消息","summary" : "概要","sendTime" : "2018-03-06 11:55","type" : "add","status" : ""
			},{"id":2,"title" : "通知消息2","summary" : "概要","sendTime" : "2018-03-06 11:55","type" : "email","status" : ""
			}]
		},
		articleListStoreMsg:{
			xtype : 'store',
            fields: [
                {name: 'id'},
                {name: 'title'},
                {name: 'summary'},
                {name: 'date',mapping:'sendTime',type: 'date'},
                {name: 'userId'},
                {name: 'type'}
            ],
			data: [{
				"id":1,
				"title" : "系统消息",
				"summary" : "概要",
				"sendTime" : "2018-03-06 11:55",
				"type" : "",
				"status" : ""
			}]
		},
		articleListStoreDb : {
			xtype : 'store',
            fields: [
                {name: 'id'},
                {name: 'title'},
                {name: 'summary'},
                {name: 'date',mapping:'sendTime',type: 'date'},
                {name: 'userId'},
                {name: 'type'},
				{name:'tipLevel'},
				{name:'tipMsg'}
            ],
			data: [{
				"id":1,"title" : "代办事项","summary" : "概要","sendTime" : "2018-03-06 11:55","type" : "","status" : "",tipLevel:0,tipMsg:"未开时"
			},{
				"id":2,"title" : "代办事项","summary" : "概要","sendTime" : "2018-03-06 11:55","type" : "","status" : "",tipLevel:1,tipMsg:"进行中"
			},{
				"id":3,"title" : "代办事项","summary" : "概要","sendTime" : "2018-03-06 11:55","type" : "","status" : "",tipLevel:2,tipMsg:"已耗时八天"
			},{
				"id":4,"title" : "代办事项","summary" : "概要","sendTime" : "2018-03-06 11:55","type" : "","status" : "",tipLevel:3,tipMsg:"马上到期"
			}]
		}
	}
});
